package com.centit.dtjktxlog.service.impl;

import java.util.Map;
import com.alibaba.fastjson.JSONArray;
import com.centit.support.database.utils.PageDesc;
 
import com.centit.framework.jdbc.service.BaseEntityManagerImpl;




import com.centit.dtjktxlog.po.JddtDtjktxlog;
import com.centit.dtjktxlog.dao.JddtDtjktxlogDao;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.centit.dtjktxlog.service.JddtDtjktxlogManager;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.validation.constraints.NotNull;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.Propagation;
/**
 * JddtDtjktxlog  Service.
 * create by scaffold 2020-03-31 
 * @author codefan@sina.com
 * T_JDDT_DTJKTXLOGT_JDDT_DTJKTXLOG【动态监控提醒日志表】   
*/
@Service
public class JddtDtjktxlogManagerImpl 
		extends BaseEntityManagerImpl<JddtDtjktxlog,String,JddtDtjktxlogDao>
	implements JddtDtjktxlogManager{

	public static final Log log = LogFactory.getLog(JddtDtjktxlogManager.class);

	
	private JddtDtjktxlogDao jddtDtjktxlogDao ;
	
	@Resource(name = "jddtDtjktxlogDao")
    @NotNull
	public void setJddtDtjktxlogDao(JddtDtjktxlogDao baseDao)
	{
		this.jddtDtjktxlogDao = baseDao;
		setBaseDao(this.jddtDtjktxlogDao);
	}
	
/*
 	@PostConstruct
    public void init() {
        
    }
 	
 */
	@Override
    @Transactional(propagation=Propagation.REQUIRED) 
	public JSONArray listJddtDtjktxlogsAsJson(
            String[] fields,
            Map<String, Object> filterMap, PageDesc pageDesc){
			
		  return null;
	}

	@Override
	public JSONArray listAsJSONArray(Map<String, Object> filterMap, PageDesc pageDesc) {
		// TODO Auto-generated method stub
		return jddtDtjktxlogDao.listAsJSONarray(filterMap, pageDesc);
	}

	@Override
	public void handle(String recId) {
		JddtDtjktxlog jddtDtjktxlog = jddtDtjktxlogDao.getObjectById(recId);
		jddtDtjktxlog.setClStatus("2");
		jddtDtjktxlogDao.updateObject(jddtDtjktxlog);
	}
	
}

